<div class="center-right-panel" ng-controller="home_ctrl">
    <div class="center-panel">
        <div class="post-list-panel">
            <div class="panel-header">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="<%=locals.currentMenu == 'home' ? 'active' : ''%>"><a href="/" role="tab" >最新文章</a></li>
                    <li class="<%=locals.currentMenu == 'hots' ? 'active' : ''%>" class=""><a href="/hots">热门文章</a></li>
                </ul>
                <!--<h4><a href="/">最新文章</a></h4>-->
            </div>
            <ul class="post-list">
                <%
                if(posts && posts.length > 0){
                for(var i = 0;i < posts.length;i++)
                {
                var post = posts[i];
                %>
                <li class="post-item">
                    <div class="clearfix">
                        <a href="javascript:;" class="avatar pull-left" title="<%-post.author.display_name%>">
                            <img src="<%-post.author.avatar.path%>" alt="<%-post.author.display_name%>"
                                 class="img-circle">
                        </a>

                        <div class="pull-left pad-left-40">
                            <h3><a title="<%=post.title%>" href="/posts/<%=post.id%>"><%=post.title%></a></h3>
                            <a title="<%=post.summary%>" href="/posts/<%=post.id%>" class="summary"><%=post.summary%></a>

                            <div class="post-info">
                                <span class="publish">发布于 <%-post.publish_date%></span>
                                <!--<a href="/posts/<%=post.id%>#comment" class="comment"><i class="fa fa-comments-o"></i> 评论(12)</a>-->
                                <span class="comment">浏览(<%-post.hits%>)</span>
                            </div>
                        </div>

                    </div>

                </li>
                <%
                }
                }%>

            </ul>
            <%-locals.pager%>
        </div>
        <%
        if(!posts || posts.length == 0){
        %>
        <div class="empty-panel">没有发布任何文章</div>
        <%
        }
        %>

    </div>
    <div class="right-panel">
        <div class="input-group mar-bottom-20 mar-top-20">
            <input class="form-control" nice-enter="js_search(input_keywords)" placeholder="输入关键字搜索"
                   ng-model="input_keywords"/>
            <span class="input-group-btn">
                <button class="btn btn-success" ng-click="js_search(input_keywords)" type="button">搜索</button>
            </span>
        </div>
        <div class="box-panel">
            <div class="box-header">
                <h4>相关下载</h4>
            </div>
            <div class="box-body">
                <ul>
                    <li><a href="http://ngnice.qiniudn.com/angular-1.2.20.zip" target="_blank">angular-1.2.20.zip</a></li>
                    <li><a href="http://ngnice.qiniudn.com/angular-1.2.18.zip" target="_blank">angular-1.2.18.zip</a></li>
                    <li><a href="http://ngnice.qiniudn.com/angular-1.2.16.zip" target="_blank">angular-1.2.16.zip</a></li>
                    <li><a href="http://ngnice.qiniudn.com/angular-1.3.0-beta.15.zip" target="_blank">angular-1.3.0-beta.15.zip</a></li>
                </ul>

            </div>
        </div>

        <div class="box-panel">
            <div class="box-header">
                <h4>公告</h4>
            </div>
            <div class="box-body">
                NgNice：Angular.js 学习和经验分享平台。<br>
            </div>
        </div>

        <!--<div class="box-panel">-->
            <!--<div class="box-header">-->
                <!--<h4>招聘</h4>-->
            <!--</div>-->
            <!--<div class="box-body">-->
                <!--<ul>-->
                    <!--<li>-->
                        <!--<a href="http://www.lagou.com/jobs/171065.html?source=ngnice" target="_blank">【北京】Web前端架构师</a>-->
                    <!--</li>-->
                    <!--<li>-->
                        <!--<a href="http://www.lagou.com/jobs/27494.html?source=ngnice" target="_blank">【北京】Web前端高级工程师</a>-->
                    <!--</li>-->
                <!--</ul>-->

            <!--</div>-->
        <!--</div>-->
        <div class="box-panel">
            <div class="box-header">
                <h4>友情链接</h4>
            </div>
            <div class="box-body">
                <ul>
                    <li>
                        <a href="http://angularjs.org?source=ngnice" target="_blank">Angular.js 官方网站</a>
                    </li>
                    <li>
                        <a title="Ionic 中文社区" href="http://ionichina.com/?source=ngnice" target="_blank">Ionic 中文社区</a>
                    </li>
                </ul>

            </div>
        </div>
    </div>
</div>


